import styles from './index.module.less'
interface ListItem {
    code: string
    professionName: string
    recruitSimpleDto: { salaryDesc: string }
    organization: { name: string }
}

interface ListType {
    list?: ListItem[]
}

const PositionZone = ({ list }: ListType) => {
    return (
        <div className={styles.PositionZone}>
            {list?.map((item: ListItem, index: number) => {
                return (
                    index < 3 && (
                        <div className={styles.PositionZone_item} key={item.code}>
                            <div className={styles.top}>
                                <div className={styles.title}>{item.professionName}</div>
                                <div className={styles.price}>{item.recruitSimpleDto.salaryDesc}</div>
                            </div>
                            <div className={styles.describe}>{item.organization.name}</div>
                        </div>
                    )
                )
            })}
        </div>
    )
}

export default PositionZone
